package cn.yto.rocketmq.rocketmqselect.config;

import cn.yto.rocketmq.rocketmqselect.annotation.MQAdminAspect;
import cn.yto.rocketmq.rocketmqselect.controller.MessageController;
import cn.yto.rocketmq.rocketmqselect.service.client.MQAdminExtImpl;
import cn.yto.rocketmq.rocketmqselect.service.impl.CollectServiceImpl;
import cn.yto.rocketmq.rocketmqselect.service.impl.MessageServiceImpl;
import cn.yto.rocketmq.rocketmqselect.task.CollectTask;
import org.springframework.util.Assert;

import java.util.Collections;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

public class RocketMqTestConfigurations {

    private static final Set<Class<?>> SETS;

    public static Set<Class<?>> getSETS() {
        return SETS;
    }

    static {
        Set<Class<?>> sets = new CopyOnWriteArraySet<>();
        sets.add(MQAdminAspect.class);
        sets.add(RMQConfigure.class);
        sets.add(MessageController.class);
        sets.add(MQAdminExtImpl.class);
        sets.add(CollectServiceImpl.class);
        sets.add(MessageServiceImpl.class);
        sets.add(CollectTask.class);
        SETS = Collections.unmodifiableSet(sets);
    }

    public static String getConfigurationClass(Class<?> configurationClass) {
        Assert.state(configurationClass != null, "Unknown storage class " + configurationClass);
        return configurationClass.getName();
    }
}
